<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateLiveAnchorsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('live_anchors', function (Blueprint $table) {
            $table->id()->comment('主播信息表');
            $table->string('name',50)->nullable()->comment('主播名称');
            $table->char('phone',20)->comment('手机号')->index();
            $table->string('avatar',)->nullable()->default('a.png')->comment('主播头像');
            $table->string('wechat',50)->nullable()->comment('主播微信号');
            $table->tinyInteger('is_show')->default(1)->comment('是否显示 0:不显示 1:显示')->index();
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('live_anchors');
    }
}
